﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ServiceModel;
using System.Data;
using System.Data.SqlClient;




namespace WCFContracts
{
 
        /// <summary> 
        /// 用于计算服务的服务契约 
        /// </summary>
   // [ServiceContract(Name = "SysUser")]
        [ServiceContract(Name = "IDBAccess")]


        public interface ICalculator
        {
            [OperationContract]
            string IGetConnstring(string ArrAuth, string strConnName, ref string strMess);

            [OperationContract]
            DateTime IGetServerTime(string ArrAuth, string strConnName, ref string strMess);

            [OperationContract]
            DataTable IGetDataTable(string ArrAuth, string strSql, string strConnName, ref string strMess);

            [OperationContract]
            string IGetDataTableXml(string ArrAuth,  string strSql, string strConnName,ref string strMess);

            [OperationContract]
            string IGetDataTableXmlZip(string ArrAuth,  string strSql, string strConnName, ref string strMess);

            [OperationContract]
            string IGetDataTableXmlSerialize(string ArrAuth, string strSql, string strConnName, ref string strMess);

            [OperationContract]
            string IGetDataTableXmlSerializeZip(string ArrAuth, string strSql, string strConnName, ref string strMess);

            [OperationContract]
            Boolean ISaveDT(string ArrAuth, string strSQL, string strxml, string strConnName, string dbname, string dbfields, ref string strMess);

            [OperationContract]
            Boolean IExecSQL(string ArrAuth,  string strSql, string strConnName, ref string strMess); 

            /// <summary>
            /// WINDOWS身份验证
            /// </summary>
            /// <param name="domain">AD域名</param>
            /// <param name="userName">用户名</param>
            /// <param name="password">密码</param>
            /// <param name="strMess">返回错误的信息</param>
            /// <returns>返回AD是否成功校验</returns>
            [OperationContract]
            Boolean IAuthUser(string strEnAuth, ref string strMess);

            /// <summary>
            /// 更改Windows帐户密码
            /// </summary>
            /// <param name="domain">AD域名</param>
            /// <param name="username">用户名</param>
            /// <param name="oldPwd">旧密码</param>
            /// <param name="newPwd">新密码</param>
            /// <param name="strMess">返回错误的的信息</param>
            /// <returns>返回是否成功更改Windows帐户密码</returns>
            [OperationContract]
            Boolean IChangeUserPasswd(string strEnAuth, ref string strMess);



        }



}
